<template>
	<div class="login-box">
		<el-tabs v-model="activeName">
			<el-tab-pane label="登录" name="login">
				<login-view></login-view>
			</el-tab-pane>
			<el-tab-pane label="注册" name="register">
				<register-view></register-view>
			</el-tab-pane>
		</el-tabs>
	</div>
</template>

<script>
import LoginView from './LoginView.vue';
import RegisterView from './RegisterView.vue';
export default {
	components: { LoginView, RegisterView },
	data() {
		return {
			// activeName: 'login',
		};
	},
	computed: {
		activeName: {
			get: function () {
				return this.$route.query.active || 'login';
			},
			set: function () {
				return this.$route.query.active || 'login';
			},
		},
	},
};
</script>

<style lang='sass' scoped>
.login-box
	padding: 10px
	width: 600px
	margin: 20px auto
	background-color: #fff
	box-shadow: 0 0 20px #cacaca
</style>